package org.lzy.shop.viewmodel.repository

import org.lzy.shop.response.LoginResponse
import org.lzy.shop.response.PicSmsResponse

interface LoginRepository {
    /**
     * 密码登录
     */
    suspend fun login(phone: String, password: String): LoginResponse?

    /**
     * 短信验证码登录
     */
    suspend fun loginSms(phone: String, smsCode: String): LoginResponse?

    /**
     * 获取图片验证码
     */
    suspend fun getPicSms(): PicSmsResponse?

    /**
     * 发送短信验证码
     */
    suspend fun sendSms(phone: String, captchaId: String, code: String): String?

    /**
     * 注册
     */
    suspend fun register(phone: String, smsCode: String, password: String, confirmPassword: String): String?

    /**
     * QQ授权登录
     */
    suspend fun loginQQ(accessToken: String, openId: String): LoginResponse?
}
